FROM zhang/java8:8-jre-alpine
VOLUME /tmp
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD wait-for-it.sh /wait-for-it.sh
ADD test-cloud-docker-eureka-1.0-SNAPSHOT.jar app.jar
RUN sh -c 'touch /app.jar'
RUN sh -c 'chmod u+x /wait-for-it.sh'
EXPOSE 8761
CMD exec java -Djava.security.egd=file:/dev/./urandom -jar /app.jar

# mvn clean install -Dmaven.test.skip=true
# docker run --name test1 -d -p 8761:8761 springcloud-docker-eureka-1.0-SNAPSHOT